using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SPSAndong.Model;
using SPSAndong.Service;
using Leeder.Business;

namespace SPSAndong.Business
{
    /// <summary>
    /// 
    /// </summary>
   public class ProductionBLL : BaseBLL<ProductionModel, ProductionService>
   {
        public ProductionBLL()
        {
            Service = new ProductionService();
        }

        public ProductionModel GetModel(string signalMark)
        {
            var result = Service.Query(p => p.SignalMark == signalMark);
            if(result.IsSuccess)
            {
                return result.ActivedObj.FirstOrDefault();
            }
            else
            {
                LogObj.Error(result.Dsca);
                return default;
            }
        }
    }
}
